package com.yanqu.road.server.cmd.banquet.crossBanquet;

import com.yanqu.road.pb.banquet.CrossBanquetProto;
import com.yanqu.road.server.cmd.base.AbstractCommand;
import com.yanqu.road.server.command.Cmd;
import com.yanqu.road.server.gameplayer.GamePlayer;
import com.yanqu.road.server.manger.banquet.CrossBanquetMgr;
import com.yanqu.road.server.pb.BanquetPb;
import com.yanqu.road.message.YanQuMessage;
import com.yanqu.road.server.protocol.Protocol;

@Cmd(code = Protocol.S_BANQUET_CROSS_LIST, desc = "请求跨服宴会列表")
public class GetBanquetCmd extends AbstractCommand {

	@Override
	public boolean parseData(YanQuMessage packet) throws Exception {
		return true;
	}

	@Override
	public void execute(GamePlayer player, YanQuMessage packet) throws Exception {

	}

	@Override
	public void sendData(GamePlayer player) {
		CrossBanquetProto.CrossBanquetListResp.Builder respMsg = CrossBanquetProto.CrossBanquetListResp.newBuilder();
		respMsg = BanquetPb.parseCrossBanquetListRespMsg(player, CrossBanquetMgr.getBanquetOpen(player));
		respMsg.setRet(ret);
		player.sendPacket(Protocol.U_BANQUET_CROSS_LIST, respMsg);
	}
}
